home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18233 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  42 lines

  1. Path: news.cc.tut.fi!vuokko!csromu
  2. From: csromu@vuokko.uta.fi (Roland Mueller)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Template implementation - code size efficiency..
  5. Date: 19 Apr 1996 07:23:18 GMT
  6. Organization: University of Tampere, Finland
  7. Distribution: world
  8. Message-ID: <4l7f16$16p@cc.tut.fi>
  9. References: <317417FA.5607@zurich.ibm.com>
  10. NNTP-Posting-Host: vuokko.uta.fi
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Keith Whittingham (wgk@zurich.ibm.com) wrote:
  14. : Is there a rule of thumb regarding the code size overhead 
  15. : for the use of a given template... Does
  16.  
  17. :    Array<unsigned int> aui;
  18. :    Array<signed int> asi;
  19.  
  20. : produce twice as much executable code as...
  21.  
  22. :    Array<signed int> asi;
  23.  
  24. : Can the compiler optimise...
  25.  
  26. : -- 
  27. : Keith Whittingham
  28. : wgk@zurich.ibm.com
  29.  
  30. I never measured the code size of template implementations,
  31. but your code in the first case results in two independend
  32. classes one for unsigned and another for signed integers.
  33. When you like to reduce your code IMO you should implement
  34. one of the classes and uses both kinds of integers w/ it.
  35.  
  36. Regards,
  37.  
  38. --
  39. Roland Mⁿller     KΣrΣjΣt÷rmΣ 4 B 15, 33310 Tampere/Finland
  40. phone         +358-31-3453609 
  41. e-mail        Roland.Mueller@uta.fi
  42.